Source for file admin.containers.html.php

Documentation is available at admin.containers.html.php

  1. <?php
  2.  
  3.     var $repository = '';
  4.     var $clist = '';
  5.  
  6.     function containersAdminHTML (&$controller$limit$clist{
  7.         basicAdminHTML::basicAdminHTML($controller$limit);
  8.         $this->repository =$controller->repository;
  9.         $this->clist = $clist;
  10.     }
  11.  
  12.     function displayIcons ($object$iconList{
  13.         if (is_object($object)) $icon $object->icon;
  14.         else $icon '';
  15.         ?>
  16.         <script type="text/javascript">
  17.         function paste_strinL(strinL){
  18.             var input=document.forms["adminForm"].elements["icon"];
  19.             input.value='';
  20.             input.value=strinL;
  21.         }
  22.         </script>
  23.         <tr>
  24.             <td width="30%" valign="top" align="right">
  25.                 <b><?php echo T_('Icon')?></b>&nbsp;
  26.             </td>
  27.             <td valign="top">
  28.                 <input class="inputbox" type="text" name="icon" size="25" value="<?php echo $icon?>" />
  29.                 <table>
  30.                     <tr>
  31.                         <td>
  32.                             <?php echo $iconList?>
  33.                         </td>
  34.                     </tr>
  35.                 </table>
  36.             </td>
  37.           </tr>
  38.           <?php
  39.     }
  40.  
  41.     function listHeader ($descendants$search{
  42.         ?>
  43.         <tr>
  44.             <td align="left"><?php echo T_('Display number').$this->pageNav->writeLimitBox()?>
  45.             </td>
  46.             <td align="left"><?php echo T_('Search:')?><input type="text" name="search" value="<?php echo $search;?>" class="inputbox" onChange="document.adminForm.submit();" />
  47.             </td>
  48.             <td align="left"><?php echo T_('Show Descendants?')?><input type="checkbox" name="descendants" value="1" <?php if ($descendantsecho 'checked="checked"'?> onChange="document.adminForm.submit();" />
  49.             </td>
  50.         </tr>
  51.         <tr>
  52.         <?php
  53.         if ($this->clist<>''{
  54.             echo '<td align="left" colspan=3>'.$this->clist.'</td>';
  55.         }
  56.         echo '</tr>';
  57.     }
  58.  
  59.     function containerSelectBox ({
  60.         ?>
  61.         <tr>
  62.             <td width="30%" valign="top" align="right">
  63.                 <b><?php echo T_('Parent container')?></b>&nbsp;
  64.             </td>
  65.             <td valign="top">
  66.                 <?php echo $this->clist?>
  67.             </td>
  68.         </tr>
  69.         <?php
  70.     }
  71.  
  72.     function startEditHeader ($title{
  73.         ?>
  74.         <form method="post" name="adminForm" action="index2.php">
  75.             <table width="100%" border="0" cellspacing="0" cellpadding="0">
  76.            <tr>
  77.             <td width="100%" colspan="4">
  78.             <div class="title">
  79.             <img src="<?php echo mamboCore::get('mosConfig_live_site').'/administrator/images/asterisk.png'?>" alt="<?php echo $title?>" />
  80.             <span class="sectionname">&nbsp;<?php echo T_('Mambo ')echo $title?></span>
  81.             </div>
  82.             </td>
  83.         </tr>
  84.         <?php
  85.         $this->blankRow();
  86.         $this->containerSelectBox();
  87.     }
  88.  
  89.     function publishedBox (&$object{
  90.         ?>
  91.                 <tr>
  92.                     <td width="30%" align="right">
  93.                       <b><?php echo T_('Published')?></b>&nbsp;
  94.                   </td>
  95.                       <?php $this->tickBox($object'published')?>
  96.                 </tr>
  97.         <?php
  98.     }
  99.  
  100.     function editLink ($id$containerid=0{
  101.         $url "index2.php?option=com_containers&amp;act=$this->act&amp;task=edit&amp;cfid=$id";
  102.         if ($containerid$url .= "&amp;containerid=$containerid";
  103.         return $url;
  104.     }
  105.  
  106.     function legalTypeList ($current{
  107.         $alternatives explode(',',_REMOS_LEGAL_TYPES);
  108.         foreach ($alternatives as $one{
  109.             if ($one == $current$mark 'selected=\'selected\'';
  110.             else $mark '';
  111.             echo "<option $mark value='$one'>$one</option>";
  112.         }
  113.     }
  114.  
  115. }
  116.  
  117.  
  118.     function columnHeads ($containers$descendants{
  119.         $this->listHeadingStart(count($containers));
  120.         $this->headingItem('30%'T_('Title'));
  121.         if ($this->clist{
  122.             $this->headingItem('5%''ID');
  123.             if (!$descendants{
  124.                 $this->headingItem('5%'T_('Reorder')2);
  125.                 $this->headingItem('2%'T_('Order'));
  126.                 ?>
  127.                 <th width="1%">
  128.                 <a href="javascript: saveorder( <?php echo count$containers )-1?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo T_('Save Order')?>" /></a>
  129.                 </th>
  130.                 <?php
  131.             }
  132.             $this->headingItem('25%'T_('Top level container'));
  133.             $this->headingItem('25%'T_('Immediate container'));
  134.         }
  135.         $this->headingItem('7%'T_('Published'));
  136.         echo '</tr>';
  137.     }
  138.  
  139.     function filecount ($container{
  140.         if ($container->filecount{
  141.             $link "<a href='index2.php?option=com_containers&amp;act=files&amp;task=list&amp;containerid=$container->id'>";
  142.             $link .= $container->filecount;
  143.             $link .= '</a>';
  144.             return $link;
  145.         }
  146.         else return '0';
  147.     }
  148.  
  149.     function listLine ($container$descendants$i$k$n{
  150.         global $mosConfig_live_site;
  151.         ?>
  152.                 <tr class="<?php echo "row$k"?>">
  153.                     <td width="5">
  154.                         <input type="checkbox" id="cb<?php echo $i;?>" name="cfid[]" value="<?php echo $container->id?>" onclick="isChecked(this.checked);" />
  155.                     </td>
  156.                     <td width="30%" align="left">
  157.                             <a href="<?php echo $this->editLink($container->id)?>">
  158.                             <?php echo $container->name?>
  159.                         </a>
  160.                     </td>
  161.                     <?php if ($this->clist?>
  162.                     <td width="5%" align="left"><?php echo $container->id?></td>
  163.                     <?php if (!$descendantsecho '<td>'.$this->pageNav->orderUpIcon$i )?>
  164.                     </td>
  165.                     <td>
  166.                     <?php echo $this->pageNav->orderDownIcon$i$n )?>
  167.                     </td>
  168.                     <td align="center" colspan="2">
  169.                     <input type="text" name="order[]" size="5" value="<?php echo $container->ordering?>" class="text_area" style="text-align: center" />
  170.                     <?php echo '</td>'?>
  171.                     <td width="25%" align="left"><?php echo $container->getCategoryName();?></td>
  172.                     <td width="25%" align="left"><?php echo $container->getFamilyNames();?></td>
  173.                     <?php }
  174.                     if ($container->published==1?>
  175.                     <td width="7%" align="center"><img src="<?php echo $mosConfig_live_site?>/administrator/images/publish_g.png" border="0" alt="Published" /></td>
  176.                     <?php else ?>
  177.                     <td width="7%" align="center"><img src="<?php echo $mosConfig_live_site?>/administrator/images/publish_x.png" border="0" alt="Published" /></td>
  178.                     <?php ?>
  179.                     </td>
  180.                 </tr>
  181.         <?php
  182.     }
  183.  
  184.     // was showContainersHTML
  185.     function view (&$containers$descendants$search='')  {
  186.         $this->formStart(T_('Containers')mamboCore::get('mosConfig_live_site').'/administrator/images/asterisk.png');
  187.         $this->blankRow();
  188.         $this->listHeader($descendants$search);
  189.         echo '</table>';
  190.         $this->columnHeads($containers$descendants);
  191.         $n count($containers);
  192.         $k 0;
  193.         foreach ($containers as $i=>$container{
  194.             $this->listLine($container$descendants$i$k$n);
  195.             $k $k;
  196.         }
  197.         $this->listFormEnd();
  198.     }
  199. }
  200.  
  201.  
  202.     function selectList ($title$selector$redstar{
  203.         $this->inputTop ($title$redstar);
  204.         ?>
  205.             <td valign="top">
  206.                 <?php echo $selector?>
  207.             </td>
  208.         </tr>
  209.         <?php
  210.     }
  211.  
  212.     function permission ($title,$container,$updown,$name{
  213.         $this->inputTop($titletrue);
  214.         ?>
  215.                     <td valign="top">
  216.                     <?php
  217.                     for ($i=0$i<4$i++{
  218.                         echo '<input type="radio" name="'.$name.'" value="'.$i;
  219.                         if ($container->$name == $iecho '" checked="checked" />';
  220.                         else echo '" />';
  221.                         echo $updown[$i];
  222.                     }
  223.                     ?>
  224.                     </td>
  225.             </tr>
  226.         <?php
  227.     }
  228.  
  229.     function groupOptions ($object$property{
  230.         ?>
  231.         <td valign="top">
  232.             <select NAME="<?php echo $property?>" class="inputbox">
  233.                 <option value="0"><?php echo _GLOBAL?></option>
  234.                 <option value="1" <?php if ($object->$propertyecho 'selected="selected"'echo '>'._YES?></option>
  235.             </select>
  236.         </td>
  237.         <?php
  238.     }
  239.  
  240.     function view (&$container)
  241.     {
  242.         $iconList mosContainer::getIcons ();
  243.         $this->commonScripts('description');
  244.         echo '<br/>';
  245.         $this->startEditHeader(T_('Edit Container details'));
  246.         $this->publishedBox($container);
  247.         $this->fileInputBox(T_('Container name')'name'$container->name50);
  248.         $this->fileInputArea(T_('Description')T_('Up to 500 characters')'description'$container->description50100true);
  249.         $this->fileInputBox(T_('Keywords'),'keywords',$container->keywords,50);
  250.         $this->fileInputBox(T_('Window title'),'windowtitle',$container->windowtitle,50);
  251.         $this->displayIcons($container$iconList);
  252.         $this->editFormEnd ($container->id);
  253.     }
  254. }
  255.  
  256. ?>

Documentation generated on Mon, 05 May 2008 16:13:52 +0400 by phpDocumentor 1.4.0